package com.order.myweb.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.my.order.common.Result;
import com.my.order.dao.User;
import com.my.order.inter.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @date 2020/10/14 10:18
 */
@RestController
@RequestMapping("user")
public class UserController {


    @Reference
    UserService userService;

    @RequestMapping("all")
    public Result userList(){
        List<User> users = userService.queryAllUser();
        return Result.success(200,"请求成功",users);
    }

}
